/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package calculator;

/**
 *
 * @author Iskandar Sarkawi
 */
public class DemoCalculator {

    public static void main(String[] args) {
        
        //create 2 calculator object
        Calculator c1 = new Calculator(1,2);
        Calculator c2 = new Calculator(3,4);

        System.out.println("Total Add for 1 and 2: " + c1.getTotal());
        System.out.println("Total Substract for 1 and 2: " + c1.getSubtract());

        System.out.println();
        System.out.println("Total Add for 3 and 4: " + c2.getTotal());
        System.out.println("Total Substract for 3 and 4: " + c2.getSubtract());

        System.out.println();
        System.out.println("Total calculator used so far: " + Calculator.getCountCalculator()); //static method

        c2.setNewNumber1(30);
        c2.setNewNumber2(40);
        System.out.println();
        System.out.println("Calculator 1 has updated its numbers values");
        System.out.println("Total Add for 30 and 40: " + c2.getTotal());
        System.out.println("Total Substract for 30 and 40: " + c2.getSubtract());

        System.out.println("\nLets use casio calculator to multiply");

        CasioCalc c3 = new CasioCalc(10,20);
        System.out.println("Lets use Casio's calculator");
        System.out.println("Total multiple is " + c3.getMultiply());
        System.out.println("Total add is " + c3.getTotal());
        System.out.println("Total subtract is " + c3.getSubtract());

        System.out.println();
        System.out.println("Total calculator used so far: " + Calculator.getCountCalculator()); //static method
    }


}
